<B:UIWS x:Class="WPFExcelReport.UWSLS"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:local="clr-namespace:ReflectionStudio.Components.UserControls;assembly=ReflectionStudio.Core" 
                    xmlns:ucd="clr-namespace:ReflectionStudio.Controls;assembly=ReflectionStudio.Controls"     
                    xmlns:B="clr-namespace:WPFExcelReport;assembly=TWASTAMM"  
                    xmlns:ex="clr-namespace:WPFExcelReport.Controls;assembly=ExControls"  
                    xmlns:SD="clr-namespace:WPFExcelReport;assembly=TSDDAT" 
                    xmlns:LS="clr-namespace:WPFExcelReport;assembly=TLIEFDAT" 
                    xmlns:Localization="clr-namespace:Localization;assembly=Localization"
                   x:Name="TV"
                    Loaded="Window_Loaded" 
      >
    <B:UIWS.Resources>
        <CollectionViewSource  x:Key="vwMaster"  />
        <ucd:Divideby10  x:Key="d10"/>
        <ucd:BoolToVisibilityConverter  x:Key="bv"/>
        <ucd:NOTBoolToVisibilityConverter x:Key="nbv"/>
        <ucd:Divideby100  x:Key="d100"/>
        <ucd:Divideby10000  x:Key="dw"/>
        <ucd:Divideby1000  x:Key="d1000"/>
        <ucd:NOTConverter  x:Key="not"/>
        <ucd:PNumConverter  x:Key="pnum"/> 
        <ucd:GB2312Convert8859P1  x:Key="gb2312"/>
    </B:UIWS.Resources>
    <StackPanel Visibility="{Binding IsExtProd,ElementName=TV,Converter={StaticResource bv}}">
        <WrapPanel Margin="0,5,0,0" >
            <Grid  Visibility="Collapsed">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock  Margin="5,0,0,0"  Grid.Column="0" Text="{Binding Source={Localization:Translate Word= 供应商品种/色号:}}"></TextBlock>
                <TextBlock  Margin="5,0,0,0"   Grid.Column="1"  
                                   Text="{Binding WALOHNA}"  
                                   MinWidth="40" Width="Auto" />
            </Grid>
            <WrapPanel>

                <TextBlock  Margin="0,0,0,0" Grid.Column="0" Text= "采购信息:"/>
                <TextBlock Margin="5,0,0,0"   Grid.Column="1"  Text="{Binding WABIND}"
                                   Visibility="{Binding IsEdit, ElementName=TV, Converter={StaticResource nbv}}"/>
                <WrapPanel  Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource bv}}">
                    <ex:NumericBox   Margin="5,0,0,0" MaxLength="8"  Grid.Column="0" DecimalPlaces="2"
                                       Text="{Binding WSPRICE,ElementName=TV}"                                     
                                       FontSize="18"   Width="60" />
                    <TextBlock Text="{Binding CURRENCY,ElementName=TV}"
                           Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource nbv}}"/>
                    <SD:TSSD0149 Grid.Column="1"
                                     KEY="{Binding CURRENCY,ElementName=TV}" 
                                      Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource bv}}"
                                     IsEdit="{Binding IsEdit,ElementName=TV}" />
                    <TextBlock Text="{Binding PRMEEH,ElementName=TV}"
                           Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource nbv}}"/>
                    <SD:TSSD0181 Grid.Column="2" 
                                     KEY="{Binding PRMEEH,ElementName=TV}" 
                                      Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource bv}}"
                                     IsEdit="{Binding IsEdit,ElementName=TV}" />
                </WrapPanel>
            </WrapPanel>

            <WrapPanel>
                <TextBlock  Grid.Row="0" Grid.Column="0" Text="{Binding Source={Localization:Translate Word=起订量:}}"></TextBlock>
                <ex:NumericBox Grid.Row="0" Grid.Column="1" Text="{Binding WAFMINPMENG}" 
                               IsReadOnly="{Binding IsEdit,ElementName=TV,Converter={StaticResource not}}" 
                                   TabIndex="505"  MinWidth="40" Width="Auto" VerticalAlignment="Top" />
                <TextBlock Text="{Binding WAUEBM,ElementName=TV}"
                           Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource nbv}}"/>
                <SD:TSSD0181  Grid.Row="0" Grid.Column="3" MinWidth="50" 
                                  KEY="{Binding WAUEBM,ElementName=TV}" 
                                  Visibility="{Binding IsEdit,ElementName=TV,Converter={StaticResource bv}}"
                                  IsEdit="{Binding IsEdit,ElementName=TV}" />
            </WrapPanel>
        </WrapPanel>
        <WrapPanel Margin="0,5,0,0">
            <Grid >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock  Grid.Column="0" Text= "我方佣金:"/>
                <ex:NumericBox Margin="10,0,0,0"   Grid.Column="1" DecimalPlaces="1"
                                       Text="{Binding WAKBON,Converter={StaticResource d100}}" 
                                       Width="50" />
                <TextBlock  Margin="5,0,0,0" Grid.Column="2" Text= "%"/>
            </Grid>
            <Grid Margin="0,5,0,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                    <ColumnDefinition Width="Auto"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <TextBlock  Margin="5,0,0,0" Grid.Column="0" Text= "供应商:"/>
                <TextBlock Margin="5,0,0,0"   Grid.Column="1"  
                                   Text="{Binding LSLIEFNA,ElementName=TV, Converter={StaticResource gb2312}}" 
                                   Width="Auto" />
                <CheckBox Grid.Column="2" 
                                  IsChecked="{Binding IsShowRight,ElementName=TV}"/>
            </Grid>
            <LS:TSLS02 KEY="{Binding WALIEFNR,ElementName=TV}"  
                               ORDERNUM="{Binding WALIEFNR,ElementName=TV}" 
                                LSLIEFNA="{Binding LSLIEFNA,ElementName=TV}"  
                                QTYP="{Binding WAKBON,ElementName=TV}"  
                               IsEdit="{Binding IsEdit,ElementName=TV}" />
        </WrapPanel>
    </StackPanel> 
</B:UIWS>
